﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Dominion.WPF.Commands;
using System.Windows.Input;
using Dominion.Core.Factories;

namespace Dominion.WPF.ViewModels
{
    public class GameControlViewModel : ViewModelBase
    {

        public GameControlViewModel()
        {
            IsFirstGameSelected = true;
        }




        public bool IsFirstGameSelected { get; set; }
        public bool IsBigMoneySelected { get; set; }
        public bool IsInteractionsSelected { get; set; }


        private RelayCommand newGameCommand;
        public ICommand NewGameCommand
        {
            get
            {
                if (UserContext.CurrentGame == null) return null;

                if (newGameCommand == null)
                    newGameCommand = new RelayCommand(NewGame);
                return newGameCommand;

            }
        }


        public void NewGame(object o)
        {
            if (IsFirstGameSelected) UserContext.InitGame(GameType.FirstGame);
            if (IsBigMoneySelected) UserContext.InitGame(GameType.BigMoney);
            if (IsInteractionsSelected) UserContext.InitGame(GameType.Interaction);
        }

    }
}
